//
//  QLVisitorTableViewController.swift
//  WeiBo01
//
//  Created by 黄跃奇 on 16/9/21.
//  Copyright © 2016年 itheima. All rights reserved.
//

import UIKit

class QLVisitorTableViewController: UITableViewController {
    
    var isLogin: Bool = false
    
    override func loadView() {
        if isLogin {
            super.loadView()
        } else {
            let visitorView = QLVisitorView()
            
            view = visitorView
            
            //未登录的情况下设置导航栏按钮
            setNavUI()
            
        }
        
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        
    }

    func setNavUI() {
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "登录", target: self, action: #selector(loginAction))
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "注册", target: self, action: #selector(loginAction))
    }
    
    //点击事件
    func loginAction() {
        print("点击了登录操作")
    }
    
    
    

}
